class Admin::Settings::GeneralController < ApplicationController
  
  def index
    @general = GeneralSetting.find(:last)
  end
  
  def edit
    @general = GeneralSetting.find(:last)
  end
  
  def update
    if (params[:general_setting])
      @general = GeneralSetting.find(:last)
      if @general.update_attributes(params[:general_setting])
        flash[:notice] = "Your setting updated"
      else
        flash[:error] = "Error while updating settings"
      end
    end
    redirect_to :action => "index"
  end
end
